home *** CD-ROM | disk | FTP | other *** search
/ Clickx 31 / Clickx 31.iso / assets / software / MyServer-win32-0.8.2.exe / web / documentation / texts / virtualhosts.htm < prev    next >
Encoding:
Extensible Markup Language  |  2005-10-06  |  5.9 KB  |  106 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  3.   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  5. <head>
  6. <title>MyServer Documentation - Creating Virtual Hosts - www.myserverproject.net</title>
  7. <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  8. <meta http-equiv="Content-Style-Type" content="text/css" />
  9. <link rel="stylesheet" type="text/css" href="../style/myserver.css" />
  10. </head>
  11. <body>
  12. <table class="center" width="95%">
  13. <tr>
  14. <td class="center">
  15. <h1 class="title">VIRTUAL HOSTS</h1>
  16. <br />
  17. In theory, virtual hosts allow users to lodge an infinite number of
  18. sites on a single machine. For example http://mypc.net is different
  19. from http://sub.mypc.net. To define virtual hosts in myServer open the
  20. file virtualhosts.xml in a text editor (such as notepad in
  21. Windows or GNU Emacs in GNU/Linux). A sample virtual hosts configuration file looks
  22. like:<br />
  23. <br />
  24.       <p class="code"><VHOSTS><br />
  25.         -<br />
  26.             <VHOST><br />
  27.         <NAME>Every connection</NAME><br />
  28.         <PORT>80</PORT><br />
  29.         <IP>127.0.0.1</IP> <br />
  30.         <PROTOCOL>HTTP</PROTOCOL><br />
  31.         <DOCROOT>web</DOCROOT><br />
  32.         <SYSFOLDER>system</SYSFOLDER><br />
  33.         <HOST>www.mysite.com</HOST> <br />
  34.         <ACCESSESLOG>logs/myServer.log</ACCESSESLOG><br />
  35.         <WARNINGLOG>logs/myServer.err</WARNINGLOG><br />
  36.         <ALLOW_CGI>NO</ALLOW_CGI><br />
  37.         </VHOST><br />
  38.         -<br />
  39.         </VHOSTS><br />
  40.       </p>
  41.       <br /><br /><br />
  42.         <span class="code"><NAME></span> gives the server administrator 
  43.         an idea of what the virtual host is such as internal Ethernet, external 
  44.         ethernet or every connection.  <br />
  45.         <br />
  46.         <span class="code"><PORT></span> is the port used for accepting 
  47.         connections<br />
  48.         <span class="code"><IP></span> is optional. It is the IP address 
  49.         for the interface your virtual host will be working on. The optional <span class="code">useRegex="YES"</span> 
  50.         means the address would act as a regular expression, not only a fixed 
  51.         value. This is more useful for networks with dynamic IP addressing.<br />
  52.         <span class="code"><PROTOCOL></span> is the protocol to be used 
  53.         by the host<br />
  54.         <span class="code"></span><span class="code"><DOCROOT></span> is 
  55.         the folder where the files are found<br />
  56.         <span class="code"><SYSFOLDER></span> is the system folder<br />
  57.         <span class="code"><HOST></span> is your virtual host's name. The 
  58.         optional <span class="code">useRegex="YES"</span> means the 
  59.         address would act as a regular expression, not only a fixed value.<br />
  60.         <span class="code"><ACCESSLOG></span> is the access log used by 
  61.         the virtual host<br />
  62.         <span class="code"><WARNINGLOG></span> is the errors log file used 
  63.         by the virtual host.<br />
  64.         <span class="code"><ALLOW_CGI></span> This option would deny the 
  65.         access to CGI in this virtual host. This line can exist in myserver.xml 
  66.         too, as a global configuration, but if it is included in virtualhosts.xml, 
  67.         this is the one that will be considered.<span class="code"> ALLOW_CGI 
  68.         </span> can also appear as <span class="code">ALLOW_FASTCGI</span>, <span class="code">ALLOW_ISAPI</span>, 
  69.         <span class="code">ALLOW_MSCGI</span> , <span class="code">ALLOW_WINCGI</span>, 
  70.         <span class="code">ALLOW_SEND_LINK, ALLOW_EXTERNAL_COMMANDS</span>, <span class="code">ALLOW_SEND_FILE</span>, 
  71.         eache of them denying/allowing the proper HTTP data handler to be used.<br />
  72.         <br /><br /> Log files can have extra options:<br />
  73.           <span class="code"><ACCESSESLOG type="combined">logs/myServerHTTP.log</ACCESSESLOG></span> 
  74.           <br />
  75.           With this option, the logs will have two extra fields: HTTP Referer 
  76.           and HTTP User Agent.<br />
  77.           Using <span class="code">cycle="yes"</span> you will enable log cycler 
  78.           on the log file. When a log file with cycling enabled reaches the max 
  79.           size for log files it will write its content to a new file and recreate 
  80.           the original file. By default cycled log files uses the gzip compression 
  81.           to save space, if you don't want to use gzip specify <span class="code">cycle_gzip="no"</span>. 
  82.           <br />
  83.       <hr />
  84.         <p class="center">MyServer gives you the option to enable the HTTP TRACE 
  85.           command for each virtual host. All you need to do is edit the security.xml 
  86.           file of the root of your virtual host (not a subdirectory in it! if 
  87.           the file doesn't exist, you may create a new one, in the format described 
  88.           in the <a href="Security.html">Security</a> section of this documentation), 
  89.           and add the parameter</p>
  90.         <p class="code"><HTTP TRACE="ON" /></p>
  91.         <p class="center">Once you do that, you enable HTTP TRACE command. By 
  92.           default, it's disabled (so, simply delete the line, if you want to disable 
  93.           it)</p>
  94.         <br /><br />
  95.  
  96. <hr />
  97. MyServer offers the feature to follow symlinks on Unix-like Operating systems (e.g.: Linux, *BSD, GNU/HURD, Solaris, etc.).<br />
  98. You can add the symlink following feature for each virtual host in the virtualhosts.xml file.<br />
  99. <span class="code"><FOLLOW_LINKS>YES</FOLLOW_LINKS></span><br /><br />
  100. The default is: <span class="code"><FOLLOW_LINKS>NO</FOLLOW_LINKS></span>
  101. This value is used by default by MyServer.
  102. </td>
  103. </tr>
  104. </table>
  105. </body>
  106. </html>